package com.haochang.chunkvod.controller.adapter.cash;

import java.util.List;

import com.haochang.chunkvod.R;
import com.haochang.chunkvod.app.utils.SaleUtils;
import com.haochang.chunkvod.controller.adapter.base.BaseAdapterHelper;
import com.haochang.chunkvod.controller.adapter.base.QuickAdapter;
import com.haochang.chunkvod.model.cash.GoodInfo;

import android.content.Context;

/**
 * 未划单商品适配器
 */
public class NoRowGoodsAdapter extends QuickAdapter<GoodInfo>
{
	private Context mContext;

	public NoRowGoodsAdapter(Context context, int layoutResId, List data)
	{
		super(context, layoutResId, data);
		mContext = context;
	}

	@Override
	protected void convert(BaseAdapterHelper helper, GoodInfo item)
	{
		helper.setText(R.id.tv_goodsName, item.getGoodsName());
		helper.setText(R.id.tv_num_unit, item.getOrderNum() + item.getUnit());
		helper.setText(R.id.tv_totalPrice, SaleUtils.getSaleString(item.getPrice()));
	}

}
